# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-pylint
pkgver=2.14.4
pkgrel=0
pkgdesc="Analyzes Python code looking for bugs and signs of poor quality"
url="https://github.com/PyCQA/pylint"
arch="noarch !s390x" # py3-dill
license="GPL-2.0-or-later"
depends="
	py3-astroid
	py3-dill
	py3-isort
	py3-mccabe
	py3-platformdirs
	py3-tomli
	py3-tomlkit
	"
makedepends="py3-setuptools"
checkdepends="
	py3-pytest
	py3-pytest-runner
	"
options="!check" # https://github.com/PyCQA/pylint/issues/3895
source="https://files.pythonhosted.org/packages/source/p/pylint/pylint-$pkgver.tar.gz
	"
builddir="$srcdir"/pylint-$pkgver

build() {
	python3 setup.py build
}

check() {
	# Requires unpackaged 'pytest-benchmark'
	rm -rf tests/benchmark
#	PYTHONPATH="$PWD/build/lib" py.test-3
	python3 setup.py pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
44d1c76571a8ed7716a7737908df1642d939716f5a8cf321e3b329880487352f8a874d71ebb87a7406c10f328c9fda00c4b417740e3b6ca93bff161b59e1f6d0  pylint-2.14.4.tar.gz
"
